<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% String path = request.getContextPath() ;%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c" %> 
<%@ taglib uri="/WEB-INF/tld/fmt.tld" prefix="fmt" %>
<%@ taglib uri="/WEB-INF/tld/ui.tld" prefix="ui" %>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑处置收款表信息</title>
<jsp:include page="../../import.jsp" flush="true" />
<jsp:include page="../assParking/assParkCommon.jsp" flush="true" /><!-- 时间格式转换 -->
</head>
<body class="iframeBody">
	<div class="Wrapper">
		<div>
			<form id="revertFund">
				<div class="fieldset1 tabel_col clearFix">
					<div class="fieldBox col_100 cwqr">
						<div class="label">冲红原因</div>
					<div class="field">
		                <textarea name="fundRedRem" id="fundRedRem" class="ui-textarea l-textarea" style="width:100%" value=""
		                          rows="4" cols="600" validate="{required:false,maxlength:1000}"></textarea>
		            </div>
					</div>
    			</div>
				<div class="btnsBox">
					<span id="revert_Btn" class="sq-button sq-button-round">申请冲红</span>
					<input type="reset" id="resetBtn" class="l-button l-button-reset Hide">
   				</div>
   					<!-- 隐藏支付表主键、支付表号 -->
			                <div class="fieldBox col_100" style="display:none;">
			                    <div class="field">
			                         <input name="redeem_Id" id="redeem_Id" type="text" class="ui-textbox" value="${redeem_Id}">
			                         <input name="vfIds" id="vfIds" type="text" class="ui-textbox" value="${vfIds}">
			                         <input name="tcDetailId" id="tcDetailId" type="text" class="ui-textbox" value="${tcDetailId}">
			                         
			                         
			                    </div>
			                </div>
			</form>
		</div>
	</div>
	<script type="text/javascript">
	 $(function () {
		  $("#revertFund").ligerForm({
	            validate: true
	        });
		  //申请冲红
	        $("#revert_Btn").click(function (event){
	            $.ligerDialog.confirm("是否确认申请冲红?", function (flag) {
	                if (flag == false)return;
	                var wait_dialog = null;
	                var form = liger.get("revertFund");
	                var data = form.getData();
	                $.ligerDialog.hide();
		            data["vfIds"] = "${vfIds}";
		            data["redeem_Id"] = "${redeem_Id}";
		            data["tcDetailId"] = "${tcDetailId}";
		            data["vfRem"] = $("#fundRedRem").val();
	                $.ajax({
	                    type: 'post',
	                    dataType: 'json',
	                    data: data,
	                    url: '<%=path%>/ass/assTrailCarD/revertFund.do',
	                    beforeSend: function () {
	                        wait_dialog = top.$.ligerDialog.SQalert({content: LogUtils.LOG_CMM_DATA_LOADING, SQ_type: "waitting"});
	                    },
	                    success: function (msg) {
	                        wait_dialog.close();
	                        if (msg.success == 1) {
	                        	 top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "success"});
	                        	parent.window.location.href="<%=path%>/ass/assTrailCarD/toRedeemViewPage.do?flag="+${flag}+"&redeem_Id="+${redeem_Id};
	                        	frameElement.dialog.close();
	                        } else {
	                            top.$.ligerDialog.SQalert({content: msg.info, SQ_type: "error",SQ_showButtons : true});
	                        }
	                    }
	            });
	        });
	        });
	   });
	  	  

	</script>
</body>
</html>